﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Text.RegularExpressions;

namespace CWB.Common.Utilities
{
    public class ValidatorUtils
    {
        public static bool IsAlpha(string code)
        {
            Regex objAlphaPattern = new Regex("[^a-zA-Z]");
            return !objAlphaPattern.IsMatch(code);
        }

        public static bool IsAlphaNumeric(string code)
        {
            Regex objAlphaNumericPattern = new Regex("[^a-zA-Z0-9]");
            return !objAlphaNumericPattern.IsMatch(code);
        }

        public static bool IsNumeric(string code)
        {
            Regex objAlphaNumericPattern = new Regex("[^0-9]");
            return !objAlphaNumericPattern.IsMatch(code);
        }
    }
}
